const app = getApp()
const api = require('../../../config/api.js')

Page({
  data: {

  },
  
  onLoad() {
    this.setData({
      iLikes:app.globalData.iLikes
    })
  },
  onUnload:function(){
    qq.switchTab({
      url: "/pages/mine/mine"
    })
  },
  cancelLike:function(e){
    let index = e.currentTarget.dataset.index
    let iLikes = this.data.iLikes
    iLikes.splice(index,1)
    this.setData({
      iLikes:iLikes
    })
  },
  toPeopleFile:function(e){
    let index = e.currentTarget.dataset.index
    let iLikes = this.data.iLikes
    app.globalData.peopleInfo = iLikes[index]
    qq.navigateTo({
      url: '/pages/peopleFile/peopleFile'　　
    })
  },


  backtoprepage:function(e){
    //跳转tabbar界面要用switchTab
    qq.switchTab({
      url: '/pages/mine/mine'
    })
  }
  
})